﻿using AutoMapper;
using B.S.BasicData.API.Write.Application.Command.Leave;
using B.S.BasicData.API.Write.Application.Command.Menu;
using B.S.BasicData.API.Write.Application.Command.Role;
using B.S.BasicData.API.Write.Application.Command.User;
using B.S.BasicData.Domain.Entities.Leave;
using B.S.BasicData.Domain.Entities.UserRoleMenu;

namespace B.S.BasicData.API.Write
{
    public class MyAutoMapper : Profile
    {
        public MyAutoMapper()
        {
            CreateMap<CreateUserCommand, UserModel>().ReverseMap();
            CreateMap<UpdateUserCommand, UserModel>().ReverseMap();

            CreateMap<CreateRoleCommand, RoleModel>().ReverseMap();
            CreateMap<UpdateRoleCommand, RoleModel>().ReverseMap();


            CreateMap<CreateMenuCommand,MenuModel>().ReverseMap();
            CreateMap<UpdateMenuCommand, MenuModel>().ReverseMap();

            CreateMap<CreateMyLeaveCommand, LeaveApplicationModel>().ReverseMap();
            CreateMap<UpdateLeaveCommand, LeaveApplicationModel>().ReverseMap();

        }
    }
}
